-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(token-lists): Automated Top100 token list generation #134
Conversation
} | ||
|
||
// Default token list for exchange + manual exclusion of broken BEP-20 token(s) | ||
const blacklist: string[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple 'blacklist' to remove default tokens already included in PancakeSwap exchange default list; plus broken/unverified BEP-20 tokens.
const getDateRange = (): string[] => { | ||
const today = new Date(); | ||
const todayISO = today.toISOString(); | ||
today.setMonth(today.getMonth() - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this works even when the month is January
.
* | ||
* @returns string[] | ||
*/ | ||
const getDateRange = (): string[] => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the simpler/only way to do this without requiring an external library.
} | ||
`, | ||
{ | ||
from: monthAgo, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now() - 1 month
Specified as 1 month, and not 30 days, for specific months like February, ...
name: item.baseCurrency.name, | ||
symbol: item.baseCurrency.symbol.toUpperCase(), | ||
address: checksummedAddress, | ||
chainId: 56, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default to chainId: 56
; as PancakeSwap v2 isn't on the testnet (yet) + no data is indexed on Chapel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Discussion about bad tokens in slack.
const command = process.argv[2]; | ||
const listName = process.argv[3]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My personal style but I prefer doing this. No need to change.
const [,, command, listName] = process.argv
Automate the generation of
pancakeswap-top-100
token list.